\(\int \frac {1}{\sqrt {1-x} \sqrt {1+x}} \, dx\) [1110]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [C] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 17, antiderivative size = 2 \[ \int \frac {1}{\sqrt {1-x} \sqrt {1+x}} \, dx=\arcsin (x) \]

[Out]

arcsin(x)

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 2, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {41, 222} \[ \int \frac {1}{\sqrt {1-x} \sqrt {1+x}} \, dx=\arcsin (x) \]

[In]

Int[1/(Sqrt[1 - x]*Sqrt[1 + x]),x]

[Out]

ArcSin[x]

Rule 41

Int[((a_) + (b_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(m_.), x_Symbol] :> Int[(a*c + b*d*x^2)^m, x] /; FreeQ[{a, b
, c, d, m}, x] && EqQ[b*c + a*d, 0] && (IntegerQ[m] || (GtQ[a, 0] && GtQ[c, 0]))

Rule 222

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[Rt[-b, 2]*(x/Sqrt[a])]/Rt[-b, 2], x] /; FreeQ[{a, b}
, x] && GtQ[a, 0] && NegQ[b]

Rubi steps \begin{align*} \text {integral}& = \int \frac {1}{\sqrt {1-x^2}} \, dx \\ & = \sin ^{-1}(x) \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(20\) vs. \(2(2)=4\).

Time = 0.00 (sec) , antiderivative size = 20, normalized size of antiderivative = 10.00 \[ \int \frac {1}{\sqrt {1-x} \sqrt {1+x}} \, dx=-2 \arctan \left (\frac {\sqrt {1-x^2}}{1+x}\right ) \]

[In]

Integrate[1/(Sqrt[1 - x]*Sqrt[1 + x]),x]

[Out]

-2*ArcTan[Sqrt[1 - x^2]/(1 + x)]

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(26\) vs. \(2(2)=4\).

Time = 0.16 (sec) , antiderivative size = 27, normalized size of antiderivative = 13.50

method result size
default \(\frac {\sqrt {\left (1+x \right ) \left (1-x \right )}\, \arcsin \left (x \right )}{\sqrt {1+x}\, \sqrt {1-x}}\) \(27\)

[In]

int(1/(1-x)^(1/2)/(1+x)^(1/2),x,method=_RETURNVERBOSE)

[Out]

((1+x)*(1-x))^(1/2)/(1+x)^(1/2)/(1-x)^(1/2)*arcsin(x)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 22 vs. \(2 (2) = 4\).

Time = 0.22 (sec) , antiderivative size = 22, normalized size of antiderivative = 11.00 \[ \int \frac {1}{\sqrt {1-x} \sqrt {1+x}} \, dx=-2 \, \arctan \left (\frac {\sqrt {x + 1} \sqrt {-x + 1} - 1}{x}\right ) \]

[In]

integrate(1/(1-x)^(1/2)/(1+x)^(1/2),x, algorithm="fricas")

[Out]

-2*arctan((sqrt(x + 1)*sqrt(-x + 1) - 1)/x)

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 1.28 (sec) , antiderivative size = 39, normalized size of antiderivative = 19.50 \[ \int \frac {1}{\sqrt {1-x} \sqrt {1+x}} \, dx=\begin {cases} - 2 i \operatorname {acosh}{\left (\frac {\sqrt {2} \sqrt {x + 1}}{2} \right )} & \text {for}\: \left |{x + 1}\right | > 2 \\2 \operatorname {asin}{\left (\frac {\sqrt {2} \sqrt {x + 1}}{2} \right )} & \text {otherwise} \end {cases} \]

[In]

integrate(1/(1-x)**(1/2)/(1+x)**(1/2),x)

[Out]

Piecewise((-2*I*acosh(sqrt(2)*sqrt(x + 1)/2), Abs(x + 1) > 2), (2*asin(sqrt(2)*sqrt(x + 1)/2), True))

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 2, normalized size of antiderivative = 1.00 \[ \int \frac {1}{\sqrt {1-x} \sqrt {1+x}} \, dx=\arcsin \left (x\right ) \]

[In]

integrate(1/(1-x)^(1/2)/(1+x)^(1/2),x, algorithm="maxima")

[Out]

arcsin(x)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 13 vs. \(2 (2) = 4\).

Time = 0.30 (sec) , antiderivative size = 13, normalized size of antiderivative = 6.50 \[ \int \frac {1}{\sqrt {1-x} \sqrt {1+x}} \, dx=2 \, \arcsin \left (\frac {1}{2} \, \sqrt {2} \sqrt {x + 1}\right ) \]

[In]

integrate(1/(1-x)^(1/2)/(1+x)^(1/2),x, algorithm="giac")

[Out]

2*arcsin(1/2*sqrt(2)*sqrt(x + 1))

Mupad [B] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 22, normalized size of antiderivative = 11.00 \[ \int \frac {1}{\sqrt {1-x} \sqrt {1+x}} \, dx=-4\,\mathrm {atan}\left (\frac {\sqrt {1-x}-1}{\sqrt {x+1}-1}\right ) \]

[In]

int(1/((1 - x)^(1/2)*(x + 1)^(1/2)),x)

[Out]

-4*atan(((1 - x)^(1/2) - 1)/((x + 1)^(1/2) - 1))